<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"  >
</head>
<body>
<s:actionerror theme="jquery" /> 
<s:actionmessage theme="jquery" />
<img id="indicator_gsuc" src="images/ajax-loader3.gif" alt="Cargando..." style="display: none" />
 <sj:accordion id="accordionx2" openOnMouseover="true" > 
     <s:iterator var="outer" status="outer_status" value="lst_sucursales" > 
     <s:set name="titulo"><s:property value="value.des" /></s:set>
     <s:set name="n_ctd"><s:property value="value.cod" /></s:set>
     <sj:accordionItem title="%{titulo}" >
	  <sj:div id='div_%{n_ctd}' >
		
		<s:form id='frm_dats_%{n_ctd}' action="guardar_sucursal.action"  theme='simple' >
				<table width="100%">
		        <s:set name="n_pros"><s:property value="cod_prospecto" /></s:set>
		        <s:set name="n_des"><s:property value="value.des" /></s:set>
		        <s:set name="n_tel1"><s:property value="value.tel1" /></s:set>
		        <s:set name="n_tel2"><s:property value="value.tel2" /></s:set>
		        <s:set name="n_tel3"><s:property value="value.tel3" /></s:set>
		        <s:set name="n_cod_est"><s:property value="value.cod_estado" /></s:set>
		        <s:set name="n_des_est"><s:property value="value.des_estado" /></s:set>
		        <s:set name="n_cod_mun"><s:property value="value.cod_mun" /></s:set>
		        <s:set name="n_des_mun"><s:property value="value.des_mun" /></s:set>
		        
		        <s:set name="n_ciudad"><s:property value="value.ciudad" /></s:set>
		        <s:set name="n_zona"><s:property value="value.zona" /></s:set>
		        <s:set name="n_avcalle"><s:property value="value.avcalle" /></s:set>
		        <s:set name="n_tpinm"><s:property value="value.tp_inmueble" /></s:set>
		        <s:set name="n_desinm"><s:property value="value.des_inmueble" /></s:set>
		        <s:set name="n_piso"><s:property value="value.piso" /></s:set>
		        <s:set name="n_nro"><s:property value="value.nro" /></s:set>
		        <s:hidden name='sucursal.cod' id='txtcodx_%{n_ctd}'  value='%{n_ctd}' ></s:hidden> 
				<s:hidden name='sucursal.des' id='txtdesx_%{n_ctd}'  value='%{n_des}' ></s:hidden> 	 
				<s:hidden name='cod_prospecto' id='txtcodprospecto_%{n_ctd}'  value='%{n_pros}' ></s:hidden> 		 
					   
		        <tr Height='10px' >
					<td width='10%' class='tabla_th1' >Telefono 1</td>
				    <td width='10%' class='tabla_th1' >Telefono 2</td>
				    <td width='10%' class='tabla_th1' >Telefono 3</td>
				</tr>
			   	<tr Height='10px' >
			   	   <td width='10%' >
			   	       <s:textfield theme='simple' cssClass='caja1' size='15' name='sucursal.tel1' id='txttel1_%{n_ctd}' value='%{n_tel1}' > </s:textfield> 
				   </td>
				   <td width='10%' >
					  <s:textfield theme='simple' cssClass='caja1' size='15' name='sucursal.tel2' id='txttel2_%{n_ctd}' value='%{n_tel2}' > </s:textfield> 
				   </td>
				   <td width='10%' >
				      <s:textfield theme='simple' cssClass='caja1' size='15' name='sucursal.tel3' id='txttel3_%{n_ctd}' value='%{n_tel3}' > </s:textfield> 
				   </td>
				</tr>  
			    <tr Height='10px' >
					<td width='10%' class='tabla_th1' >Estado</td>
				    <td width='10%' class='tabla_th1' >Municipio</td>
				    <td width='10%' class='tabla_th1' ></td>
				</tr>
		       	<tr Height='10px' >
			   	   <td width='10%' >
			   	     <s:url id="urlxubx" action="cargar_estados.action" /> 
				     <sj:select href="%{urlxubx}" theme='simple'  list='estados'
						 cssClass='caja_3' name="esta.cod" 
						 id='cbest_%{n_ctd}' headerKey="%{n_cod_est}"
						 headerValue='%{n_des_est}'
						 onChangeTopics='reloadsecondlist__%{n_ctd}'
						 listKey='cod' listValue='descripcion'
						 indicator='progreso_ccxyswwww'
				     />
				     <img id="progreso_ccxyswwww" src="images/ajax-loader4.gif" alt="..." style="display:none"/>
			   	    </td>
				   <td width='10%' >
				       <s:url id="urlxubx2" action="cargar_estados.action" /> 
				       <sj:select href="%{urlxubx2}"  theme='simple'
						 cssClass='caja_3' name="sucursal.cod_mun" 
						 id="cbmun_%{n_ctd}" headerKey="%{n_cod_mun}"
						 headerValue="%{n_des_mun}" list="municipios"
						 listKey='cod' listValue='descripcion'
						 reloadTopics="reloadsecondlist__%{n_ctd}" formIds="frm_dats_%{n_ctd}"
				       />
					</td>
				   <td width='10%' >
				   </td>
				</tr>  
		
		        <tr Height='10px' >
					<td width='10%' class='tabla_th1' >Ciudad</td>
				    <td width='10%' class='tabla_th1' >Zona</td>
				    <td width='10%' class='tabla_th1' >Av/Calle</td>
				</tr>
			   	<tr Height='10px' >
			   	   <td width='10%' >
			   	       <s:textfield theme='simple' cssClass='caja1' size='40' name='sucursal.ciudad' id='txtzona_%{n_ctd}' value='%{n_ciudad}' > </s:textfield> 
				   </td>
				   <td width='10%' >
					  <s:textfield theme='simple' cssClass='caja1' size='40' name='sucursal.zona' id='txtzona_%{n_ctd}' value='%{n_zona}' > </s:textfield> 
				   </td>
				   <td width='10%' >
				      <s:textfield theme='simple' cssClass='caja1' size='60' name='sucursal.avcalle' id='txtavcalle_%{n_ctd}' value='%{n_avcalle}' > </s:textfield> 
				   </td>
				</tr>   
				<tr Height='10px' >
				    <td width='20%' class='tabla_th1' >Tipo Inmueble/Descripcion</td>
				    <td width='10%' class='tabla_th1' >Piso</td>
				    <td width='10%' class='tabla_th1' >Nº</td>
				</tr>    
				<tr Height='10px' >
				   <td width='20%' >	
				       <s:url id="url_cargtpinm" action="cargar_tpinm.action" /> 
				       <sj:select href="%{url_cargtpinm}" theme='simple'  list='lista_datos'
						 cssClass='caja_3' name="sucursal.tp_inmueble" id='cbtpinm_%{n_ctd}' 
						 headerKey="%{n_tpinm}" headerValue='%{n_tpinm}' value="%{n_tpinm}"
						 listKey='cod' listValue='descripcion' indicator='progreso_carg_tpinm'
				         />
				       <img id="progreso_carg_tpinm" src="images/ajax-loader4.gif" alt="..." style="display:none"/>
		 			     <s:textfield  theme='simple' cssClass='caja1' size='40' name='sucursal.des_inmueble' id='txtdes_inmueble_%{n_ctd}' value='%{n_desinm}' > </s:textfield>
				   </td>
				   <td width='10%' >
				     
				       <s:textfield theme='simple' cssClass='caja1' size='5' name='sucursal.piso' id='txtpiso_%{n_ctd}' value='%{n_piso}'  > </s:textfield>     
				   </td>
				    <td width='10%' >
				         <s:textfield theme='simple' cssClass='caja1' size='5' name='sucursal.nro' id='txtnro_%{n_ctd}' value='%{n_nro}'  > </s:textfield> 
				   </td>
			   </tr>
			   <tr>
			   <td>
			      
			   </td>
			   <td>
			     <sj:submit cssClass="boton_sia1"
						targets="div_%{n_ctd}" indicator="indicator_gsuc" button="true"
						value="Guardar" theme="simple" />
			   </td>
			   <td>
			   </td>
			   </tr>
				 </table>
		 </s:form>
		 </sj:div>
           </sj:accordionItem> 
        </s:iterator> 
    </sj:accordion> 
</body>
</html>